// 把所有数组类型的元素 变成Childs数组
export function pointsToChilds(list = []) {
  const arr = []
  list.forEach(obj => {
    Object.keys(obj).forEach(key => {
      const isArr = Array.isArray(obj[key])
      if (isArr) {
        obj['Childs'] = obj[key]
        pointsToChilds(obj['Childs'])
        delete obj[key]
      }
    })
    arr.push(obj)
  })
  return arr
}
